1. Field of the Invention
The present invention relates to a digital broadcast receiver with a recording medium, and more particularly, to an apparatus and method for recording/playing a moving picture in a digital broadcast receiver, which supports a trick mode.
2. Discussion of the Related Art
One of digital TV application services, which are being widely spread, is a personal video recorder (PVR). The personal PVR is to provide viewers with additional convenient functions by employing a hard disk drive (HDD) having low cost and high capacity in a digital broadcast receiver. For example, if a viewer inputs a pause command to leave its seat for a while in the course of viewing a TV, a system inside the PVR records a broadcasting stream in the HDD from the time when the pause command is input, and plays the broadcasting stream from the time after a resume command is input. In this case, the recording operation and the reproducing operation are executed by a time difference corresponding to the time when the pause command is input.
The broadcasting stream recorded in the HDD is played in several trick modes. Examples of the trick modes include a slow play mode, a fast play mode, and a reverse play mode in addition to a normal play mode. For trick play, when the broadcasting stream is recorded, features of a video bit stream corresponding to each transport stream (TS) are extracted to generate related index data. Thus, the broadcasting stream is recorded along with the related index data. The broadcasting stream is played referring to the index data, so that various kinds of trick play that can fulfill the viewer's request can be provided.
Meanwhile, a data format of the moving picture expert group (MPEG) standard, which is used for compression and transmission of digital video, is divided into a program stream and a transport stream. The program stream is used to record digital video in a recording medium, which has little error in transmission. By contrast, the transport stream having a fixed packet length is used for digital broadcasting in which a transmission channel is relatively unstable. In other words, a system that transmits digital video through a transport packet of a constant unit can readily detect error and prevent error from being spread.
A general apparatus for recording/playing a transport stream extracts data required for play and records the data in a recording medium by inserting a time stamp. In this case, examples of the data required for play include a starting position of a frame, a type of a frame, an encoded frame rate, and a bit rate. Such data are used for trick play of high speed or low speed in accordance with an output mode.
Unlike an analog TV, a digital TV prevents noise and ghost from occurring by reducing a transmission error, thereby obtaining high sound quality and high picture quality. Also, the digital TV transmits data such as audio, video and text by efficiently compressing the data using an excellent digital compression technique. In this case, since the amount of the data required for one channel can be reduced, several channels can be transmitted to one channel of the existing TV. As a result, it is possible to provide various kinds of information through such multi-channels.
It is a general trend that such a digital TV of high quality is being substituted for an analog TV due to its fast speed and its various functions are being reflected on a digital TV receiver.
However, it is general that the digital TV has a function that receives analog broadcasting as well as digital broadcasting as far as the analog broadcasting continues to exist. A digital TV having a PVR function has no problem in recording and playing digital video data of the digital broadcasting. However, the digital TV additionally needs an MPEG encoder to provide such a PVR function in recording and playing the analog broadcasting, wherein the MPEG encoder converts analog data into recordable digital data.
A moving picture compression method of the MPEG encoder is based on a method for removing spatial redundancy and temporal redundancy. To remove the spatial redundancy, the MPEG encoder converts data of a pixel domain into data of a frequency domain and quantizes the data of the frequency domain. In this case, it is possible to remove high frequency components unsusceptible to eyesight and reduce the amount of data to be recorded.
To remove the temporal redundancy, the MPEG encoder uses motion prediction and compensation. In other words, the MPEG encoder searches for a portion having a pixel value, which is similar to a current video frame, from a reference video frame, so as to encode the searched portion using a motion vector and also encode the other differential value through frequency conversion.
Types of the video frame of the MPEG moving picture include Intra (I), Predictive (P), and Bi-predictive (B). The I frame does not require a reference frame and is a self-recoverable video frame. The P frame requires one reference frame first decoded. The B frame requires two reference frames first decoded.
Therefore, a frame sequence of the MPEG moving picture has a structure such as “ . . . ,B,B,I,B,B,P,B,B,P,B,B, . . . ,” wherein a frame from the I frame to the next I frame is called a group of picture (GOP) based on a transmission order. Supposing that the number of frames in the GOP is N and the number of frames between the I frame and the P frame or between the P frame and the P frame is M, N and M are variable in one sequence.
At this time, since the I frame is self-recoverable without a reference frame, error accumulation by motion compensation is removed so as to refresh a video decoder.
Trick play of the PVR fundamentally controls times speed based on the I frame.
FIG. 1 illustrates several examples of related art forward trick play. In other words, it is supposed that a video sequence having a GOP structure, in which the number of frames from the I frame to the next I frame is fifteen as shown in 101, is recorded in an HDD.
In this case, for forward trick play of fifteen times speed, only the I frame is simply read from the HDD as shown in 102. The I frame is input to a video decoder in forward direction in accordance with a frame rate to recover the I frame. Then, if the recovered I frame is displayed, it is possible to play the I frame at fifteen times speed.
In this case, the size of a video buffering verifier (VBV) memory that stores video bit streams is additionally required unlike a normal play video stream. This is because that the VBV memory decodes only the I frame and thus remarkably increases the whole bit rate in comparison with the video sequence that additionally includes P and R frames.
In the GOP structure shown in 101, for trick play of three times speed, the I and P frames excluding the B frame are read from the HDD as shown in 103 and then decoded in forward direction in accordance with the frame rate. In this case, it is possible to play the frames at three times speed.
In the GOP structure shown in 101, for trick play of two times speed, one frame is skipped and a corresponding frame is decoded as shown in 104. In this case, since a reference frame may not be decoded, perfect video may not be recovered. For example, to decode a B1 frame of 104, I0 and P0 reference frames are required. However, since the P0 frame is not decoded, the B1 frame cannot be recorded normally.
Therefore, in the related art, trick play of two times speed is provided for decoding as shown in 105. However, in 105, a corresponding frame is decoded and displayed to obtain two times speed effect while one or two video frames are skipped. In this case, instead of a moving picture of two times speed, abnormal moving picture may be played.
Furthermore, in case where the moving picture is played in reverse direction in the related art, such abnormal trick play occurs more seriously.
FIG. 2 illustrates several examples of related art reverse trick play. For a video sequence having a GOP structure shown in 201, reverse trick play of fifteen times speed is simply provided as shown in 202.
However, in the GOP structure shown in 201, trick play of times speed other than fifteen times speed actually makes normal reverse play impossible.
In case of reverse trick play in the related art, only I frame that can be decoded in reverse direction is read from the HDD and then decoded. Then, the I frame is repeatedly played and stopped in accordance with each times speed and frame rate. In other words, trick play effect is obtained as upload is controlled in accordance with corresponding times speed as shown in 203 or 204. As a result, reverse trick play that causes abnormal interconnection between frames is provided.